<template>
	<view class="conten" :style="{ backgroundImage: `url(${bgImage})` }">
		<view class="conten_main"  >
			<view style="margin: 20px;">
				<u-input  border="surround" shape="circle" confirm="seach" >
					<template slot="prefix"  margin="0 3px 0 0">
						<u-row   justify="space-between"  gutter="10">
						    <u-col span="2">
						        <image src="/static/serachleft.png" style="width: 14px;height: 14px;"></image>
						    </u-col>
						    <u-col span="10">
						        <u--text text="输入运单号 |"  type="tips"></u--text>
						    </u-col>
						</u-row>
					</template>
					<template slot="suffix"  margin="0 3px 0 0">
						<image src="/static/scan.png" style="width: 14px;height: 14px;"></image>
					</template>
				</u-input>
			</view>
			<view >
				<u-row justify="space-between"  customStyle="margin-bottom: 10px">
					<u-col span="4"  offset="1">
						<text style="font-size: 16px;font-weight: bold;">开启派送状态</text>
					</u-col>
					<u-col span="3"  offset="1">
						<u-switch v-model="value" @change="change" activeColor="#5ac725"></u-switch>
					</u-col>
				</u-row>
				
			</view>
			<!-- 网点列表 -->
			<view v-for="(item, index) in indexList" :key="index">
				<view style="margin: 10px;border-radius: 12px;padding: 5px;background-color:#FEFEFE;">
				<u-row justify="space-between"  customStyle="margin-bottom: 10px;padding: 5px;">
					<u-col span="4"  offset="1">
						<text style="font-size: 14px;color: #000000;font-weight: bold;margin-bottom: 10px">{{item.name}}</text>
						<u-row  customStyle="margin-bottom: 10px">
							<u-col span="4"  >
								<text style="font-size: 12px;">网点件</text>
							</u-col>
							<u-col span="4" >
								<text style="color:#5A9CFF;font-size: 12px;">{{item.wdnum}}</text>
								
							</u-col>
							<u-col span="4">
								<text style="font-size: 12px;">上门件</text>
							</u-col>
							<u-col span="4">
								<text style="color:#FF5D5D;font-size: 12px;">{{item.smnum}}</text>
							</u-col>
						</u-row>
					</u-col>
					<u-col  span="4">
						<view style="padding: 10px;">
							<u-button class="custom-style" v-if="item.status==0" type="success" shape="circle" size="small" text="开启派送" @click="startpaisong"></u-button>
						</view>
						
						<text v-if="item.status==1" style="color:#AAAAAA;font-size:12px;">派送中</text>
					</u-col>
				</u-row>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				value:"",
				value15: '',
				bgImage:'/static/bg.png',
				indexList: [],
			}
		},
		onLoad(e) {
			this.loadmore();
		
		
		},
		onHide() {
		},
		mounted() {},
		methods: {
			//开启派送
			change(){
				
			},
			//开启派送
			startpaisong(){
				
			},
			//搜索
			seach(){
				uni.navigateTo({
					url: "/pages/serach/index"
				})
			},
			  scrolltolower() {
			        this.loadmore();
			      },
			      loadmore() {
			        for (let i = 0; i < 3; i++) {
			          this.indexList.push({
			            name: "大风第七小学网点",
						wdnum:118,
						smnum:118,
						status:0
			          },
					  {
					    name: "大风第七小学网点",
					  						wdnum:118,
					  						smnum:118,
					  						status:1
					  }
					  );
			        }
			      },
		}
	}
</script>

<style lang="scss" scoped>
	.conten {
		width: 100%;
		height: 100vh;
		//position: relative;
		position: absolute;
		  top: 0;
		  left: 0;
		  width: 100%;
		  height: 100%;
		  background: url('/static/bg.png') no-repeat center;
		  background-size: cover;
		  z-index: 0; /* 确保背景在最底层 */
	}
	.conten_main {
		width: 100%;
		height: 100vh;
	}
.custom-style {
		color:#FFFFFF;
		width: 180rpx;
	}
	
</style>